using System;
using System.Collections.Generic;
using System.Text;

namespace AntEater.ComponentModel
{
    /// <summary>
    /// Provides the event arguments for a tracked property chnaged event.
    /// </summary>
    internal class TrackedPropertyChangedEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="T:TrackedPropertyChangedEventArgs"/> class.
        /// </summary>
        /// <param name="trackedItem">The tracked item.</param>
        /// <param name="oldPropertyValue">The old property value.</param>
        /// <param name="newPropertyValue">The new property value.</param>
        public TrackedPropertyChangedEventArgs(object trackedItem, object oldPropertyValue, object newPropertyValue) {
            this._trackedItem = trackedItem;
            this._oldPropertyValue = oldPropertyValue;
            this._newPropertyValue = newPropertyValue;
        }

        private object _trackedItem;

        /// <summary>
        /// Gets the tracked item.
        /// </summary>
        /// <value>The tracked item.</value>
        public object TrackedItem {
            get { return _trackedItem; }
        }

        private object _oldPropertyValue;

        /// <summary>
        /// Gets or sets the old value.
        /// </summary>
        /// <value>The old value.</value>
        public object OldPropertyValue {
            get { return _oldPropertyValue; }
        }

        private object _newPropertyValue;

        /// <summary>
        /// Gets or sets the new property value.
        /// </summary>
        /// <value>The new property value.</value>
        public object NewPropertyValue {
            get { return _newPropertyValue; }
        }
    }
}
